Motor control systems designed to convert direct-current electric power supplied from a direct-current power source, such as a battery, to alternating-current electric power by an inverter for driving a motor, such as a three-phase synchronous electric machine, are in wide use. An inverter turns a plurality of switching elements on/off at a predetermined carrier frequency, thereby converting direct-current electric power to three-phase alternating-current electric power. When the carrier frequency is high and the on/off operations are performed with a high frequency, the waveform of the output three-phase alternating-current electric power is smooth, which makes control for the motor stabilized; however, the temperature of the switching elements increases due to a large amount of heat generated by the switching elements. On the other hand, when the carrier frequency is low and the on/off operations are performed with a low frequency, the waveform of the output three-phase alternating-current electric power includes fluctuation components, which deteriorate stability of motor control; however, the temperature rise in the switching elements is reduced, as the amount of heat generated by the switching elements is not so great. Therefore, in general, high carrier frequencies are used when the number of revolutions of a motor is high, whereas low carrier frequencies are used when the number of revolutions of a motor is low. Further, when the output torque of a motor is large, the amount of heat generated by the switching elements is large, as a great amount of electric current flows therein, whereas when the output torque of a motor is small, the amount of heat generated by the switching elements is also small, as a small amount of electric current flows therein. Accordingly, there is proposed a control method for controlling the carrier frequency to a low level when the motor has a low number of revolutions and a large torque, in order to suppress heat generation and temperature rise of the switching elements, and controlling the carrier frequency to a high level when the motor has a high number of revolutions, in order to ensure stability of control (see Patent Document 1, for example).